package com.allwees.bs.module.ics.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.allwees.bs.core.model.wf.entity.WorkflowEntity;
import com.allwees.bs.module.ics.wf.EIcsOfferAction;
import com.allwees.bs.module.ics.wf.EIcsOfferState;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.math.BigDecimal;
import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * 网红签约信息
 *
 * @author yangylsky
 * @since 2020-05-15
 *
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ics_offer")
public class IcsOffer extends WorkflowEntity<EIcsOfferState, EIcsOfferAction> {
    @Column(unique = true, length = 32)
    protected String no;

	/**
	 * 网红UUID
	 */
    @Column(length = 48)
    protected String icUuid;

	/**
	 * 操作人UUID
	 */
    @Column(length = 48)
	protected String opUuid;

    @Column(length = 48)
	protected String currency;

    /**
     * 系统评估价
     */
    @Column(precision = 8, scale = 2)
    protected BigDecimal evaluatedPrice;

    /**
     * 沟通价
     */
    @Column(precision = 8, scale = 2)
    protected BigDecimal proposedPrice;

    /**
     * 成交价
     */
    @Column(precision = 8, scale = 2)
    protected BigDecimal confirmedPrice;

    @Temporal(TemporalType.DATE)
    protected Date beginAt;

    @Temporal(TemporalType.DATE)
    protected Date endAt;

	protected Integer engagements;

	protected String comment;

    public static void main(String[] args) {
        System.out.println(TimeUnit.valueOf("MICROSECONDS"));
    }
}
